/*
 * Copyright 2003 ISS.
 * The contents contained in this document may not be reproduced in any
 * form or by any means, without the written permission of ISS, other
 * than for the purpose for which it has been supplied.
 *
 */
package sg.edu.nus.iss.vmcs.system;

import sg.edu.nus.iss.vmcs.customer.CustomerPanel;
import sg.edu.nus.iss.vmcs.customer.ProductSelectionBox;
import sg.edu.nus.iss.vmcs.customer.TransactionController;
import sg.edu.nus.iss.vmcs.maintenance.MaintenanceController;
import sg.edu.nus.iss.vmcs.maintenance.ProductDisplay;
import sg.edu.nus.iss.vmcs.store.ProductBrand;
import sg.edu.nus.iss.vmcs.store.ProductStore;
import sg.edu.nus.iss.vmcs.store.ProductStoreItem;

/**
 * Abstract Factory for creating product objects
 * 
 * @author Toh Kim Huat
 */
public abstract class ProductFactory {

	/**
	 * Factory method that creates a StoreItem with a StoreObject and quantity
	 * 
	 * @param content
	 *            content of this StoreItem will represent
	 * @param quantity
	 *            the quantity of this StoreItem
	 */
	public abstract ProductStoreItem createProductStoreItem(ProductBrand content, int quantity);

	/**
	 * Factory method that creates a ProductBrand
	 */
	public abstract ProductBrand createProductBrand();

	/**
	 * Factory method that creates a ProductBrand with a name
	 * 
	 * @param n
	 *            the name of the ProductBrand
	 */
	public abstract ProductBrand createProductBrand(String name);

	/**
	 * Factory method that creates a ProductStore
	 */
	public abstract ProductStore createProductStore();

	/**
	 * Factory method that creates an instance of a Product Selection Box
	 * 
	 * @param customerPanel
	 *            The parent customer panel
	 * @param transactionController
	 *            The transaction controller controlling this object
	 */
	public abstract ProductSelectionBox createSelectionBox(
			CustomerPanel customerPanel,
			TransactionController transactionController);

	/**
	 * Factory method that creates an instance of a product display
	 * @param mctrl
	 * @return
	 */
	public abstract ProductDisplay createProductDisplay(MaintenanceController mctrl);
	
	public abstract ProductPropertyLoader createProductPropertyLoader(String filen);

	/**
	 * Get the product factory
	 * 
	 * @return The product factory
	 */
	public static ProductFactory getFactory() {
		return new DrinkProductFactory();
	}

}
